<!DOCTYPE html>
<html lang="">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width,initial-scale=1.0">
    <link rel="icon" href="<%= BASE_URL %>favicon.ico">
    <title><%= htmlWebpackPlugin.options.title %></title>
  </head>
  <body>
    <noscript>
      <strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
    </noscript>
    <router-link id="app"></router-link>
    <!-- built files will be auto injected -->
  </body>
</html>

<script>
  (function (doc, win) {
  var docEl = win.document.documentElement;
  var resizeEvt = 'orientationchange' in window ? 'orientationchange' : 'resize';
  var refreshRem = function () {
  var clientWidth = win.innerWidth
  || doc.documentElement.clientWidth
  || doc.body.clientWidth;
  console.log(clientWidth)
  if (!clientWidth) return;
  var fz;
  var width = clientWidth;
  fz = 16 * width / 375;
  docEl.style.fontSize = fz + 'px';//这样每一份也是16px,即1rem=16px
  };
  if (!doc.addEventListener) return;
  win.addEventListener(resizeEvt, refreshRem, false);
  doc.addEventListener('DOMContentLoaded', refreshRem, false);
  refreshRem();
 })(document, window);
</script>